#define _CRT_SECURE_NO_WARNINGS 1
#include "stack.h"
#if 0
int main()
{
	ST s;
	STInit(&s);
	STPush(&s, 1);
	STPush(&s, 2);
	STPush(&s, 3);
	STPush(&s, 4);

	printf("%d\n", STTop(&s));
	STPop(&s);
	printf("%d\n", STTop(&s));
	STPop(&s);
	STPop(&s);
	STPop(&s);

	STDestroy(&s);

	return 0;
}
#endif


int main()
{
	ST s;
	STInit(&s);
	STPush(&s, 1);
	STPush(&s, 2);
	STPush(&s, 3);
	STPush(&s, 4);

	//如果栈不等于空
	while (!STEmpty(&s))
	{
		printf("%d ", STTop(&s));
		STPop(&s);
	}

	STDestroy(&s);
}